#pragma once

#include "irender/writer.h"
#include <imglib/imageclass.h>

namespace irender {

///wraps another writer, sending to it combination of image pairs
class field_writer : public writer
{
public:
	///\param a will be taken under control by field_writer
	field_writer(writer_aptr adaptee, bool upper_first);
	virtual ~field_writer() {}
	virtual field_writer & add(byte_image const & img);
private:
	writer_aptr adaptee_;
	bool upper_first_; ///< otherwise Lower First
	byte_image buffer_;
};

} // namespace irender
